import React, { useState } from 'react'
import {View, Text, Input, Image, Textarea, Span} from '@tarojs/components'
import PageWrapper from '@/components/PageWrapper'
import './index.scss';
import {navigateTo} from "@/utils/navigation";
const Page = () => {
  const [active, setActive] = useState<'A' | 'B'>('A')
  return (
    <PageWrapper title="鉴定溯源" showBack={true} backgroundColor='#FE7407' color="#ffffff">
      <View className="my-service-page">
        <View className="my-service"></View>
        <View className="box">
          <View className="type-box">
            <View className={active === 'A' ? 'type-checked' : 'type'} onClick={() => setActive('A')}>二维码查询</View>
            <View className={active === 'B' ? 'type-checked' : 'type'}  onClick={() => setActive('B')}>防伪码查询</View>
          </View>
          {active === 'A' && (
            <View>
              <View className="photo-box">
                <Image className="photo1" src={require('../../../assets/home/source2.png')}></Image>
                <Image className="photo2" src={require('../../../assets/home/source1.png')}></Image>
              </View>
              <View className="tips grey">点击上方图片进行扫码识别 请对准瓶身标签二维码</View>
              <View className="tips orange">扫描瓶身二维码进行查询溯源</View>
            </View>
          )}
          {active === 'B' && (
            <View>
              <View className="photo-box">
                <Image className="photo3" src={require('../../../assets/home/source3.png')}></Image>
              </View>
              <View className="tips black">20240618002565398</View>
              <View className="inp-box">
                <Image className="inp-img" src={require('../../../assets/home/search2.png')}></Image>
                <Input className="inp" placeholder="请输入搜索关键词"></Input>
                <View className="inp-but">点击查询</View>
              </View>
              <View className="tips black">输入瓶身二维码编码进行查询溯源</View>
            </View>
          )}

        </View>
        {active === 'A' && (
          <View className="submit-but">发布</View>
        )}
      </View>
    </PageWrapper>
  )
}

export default Page
